g05hdf

g05hdf © Numerical Algorithms Group, 2002.

Purpose

G05HDF Generates a realisation of a multivariate time series from a VARMA model

Synopsis

[w,ref,ifail] = g05hdf(ip,iq,par,qq,n<,mean,ref,mode,ifail>)

Description

 
                                    T                         
 Let the vector W =(w  ,w  ,...,w  ) , denote a k dimensional time
                 t   1t  2t      kt                           
 series which is assumed to follow a vector autoregressive moving 
 average (VARMA) model of the form:
 
 W -(mu)=(phi) (W   -(mu))+(phi) (W   -(mu))+...+(phi) (W   -(mu))+
  t           1  t-1            2  t-2                p  t-p
 
 (epsilon) -(theta) (epsilon)   -(theta) (epsilon)   -...
          t        1         t-1        2         t-2    
 
 -(theta) (epsilon)                                            (1)
         q         t-q                                       
 
                                                           T     
 where (epsilon) =((epsilon)  ,(epsilon)  ,...,(epsilon)  ) , is a
                t           1t          2t              kt       
 vector of k residual series assumed to be Normally distributed 
 with zero mean and positive-definite covariance matrix (Sigma). 
 The components of (epsilon)  are assumed to be uncorrelated at 
                            t                                  
 non-simultaneous lags. The (phi) 's and (theta) 's are k by k 
                                 i              j             
 matrices of parameters. {(phi) }, for i=1,2,...,p, are called the
                               i                               
 autoregressive (AR) parameter matrices, and {(theta) }, for 
                                                     j      
 j=1,2,...,q, the moving average (MA) parameter matrices. The 
 parameters in the model are thus the p k by k (phi)-matrices, the
 q k by k (theta)-matrices, the mean vector (mu) and the residual 
 error covariance matrix (Sigma). Let
 
                        [(phi)    I 0 . . . 0]
                        [     1              ]
                        [(phi)    0 I 0 . . 0]
                        [     2              ]
                        [.            .      ]
               A((phi))=[.              .    ] 
                        [.                .  ]
                        [(phi)    0 . . . 0 I]
                        [     p-1            ]
                        [(phi)    0 . . . 0 0]
                        [     p              ]pk*pk
 
 and 
 
                        [(theta)    I 0 . . . 0]
                        [       1              ]
                        [(theta)    0 I 0 . . 0]
                        [       2              ]
                        [.          .          ]
             B((theta))=[.            .        ] 
                        [.              .      ]
                        [(theta)    0 . . . 0 I]
                        [       q-1            ]
                        [(theta)    0 . . . 0 0]
                        [       q              ]qk*qk
 
 where I denotes the k by k identity matrix.
 
 The model (1) must be both stationary and invertible. The model 
 is said to be stationary if the eigenvalues of A((phi)) lie 
 inside the unit circle and invertible if the eigenvalues of 
 B((theta)) lie inside the unit circle.
 
 At the user's request a new realisation of the time series may be
 generated with less computation using only the information saved 
 in a reference vector from a previous call to G05HDF. 
 
 The routine returns a realisation of W ,W ,...,W . On a 
                                       1  2      n      
 successful exit, the recent history is updated and saved in the 
 array REF so that G05HDF may be called again to generate a 
 realisation of W   ,W   ,...,etc. 
                 n+1  n+2                                   
 

Parameters

g05hdf

Required Input Arguments:

ip                                    integer
iq                                    integer
par (:)                               real
qq (:,:)                              real
n                                     integer

Optional Input Arguments:                       <Default>

mean (1)                              string   'z'
ref (:)                               real     zeros(g05hdf13(k,ip,iq),1)
mode (1)                              string   's'
ifail                                 integer  -1

Output Arguments:

w (:,n)                               real
ref (:)                               real
ifail                                 integer